<?php

namespace app\http\api\controller;

use app\http\api\service\PosService;
use DI\Attribute\Inject;
use support\Request;
use support\Response;

/**
 * @desc    设备管理
 * @author  OverMiracle
 * @date    2024-02-15
 */
class Pos
{
    #[Inject]
    protected PosService $posService;

    public function index(Request $request): Response
    {
        $data = [
            'keyword' => $request->post('keyword', ''),
            'start'   => $request->post('start', 0),
            'length'  => $request->post('length', 10),
            'type'    => $request->post('status', 1), //1已绑定，2申请中
        ];
        return json($this->posService->getList($data));
    }
}